package main

import (
	"fmt"
	"math/rand"
	"time"
)

type Solution struct {
	nums   []int
	origin []int
}

func Constructor(nums []int) Solution {
	rand.Seed(time.Now().UnixNano())
	tmp := make([]int, len(nums))
	copy(tmp, nums)
	return Solution{
		nums:   nums,
		origin: tmp,
	}
}

func (s *Solution) Reset() []int {
	return s.origin
}

func (s *Solution) Shuffle() []int {
	for i := 0; i < len(s.nums); i++ {
		r := rand.Intn(i + 1)
		s.nums[i], s.nums[r] = s.nums[r], s.nums[i]
	}
	return s.nums
}
func demo() {
	rand.Seed(time.Now().UnixNano())
}

func main() {
	demo()
	fmt.Println(rand.Intn(100))
	fmt.Println(rand.Intn(100))
}
